﻿var language="ch_cn";var minRequire=0;var leaveWordPrompt="";var otherItemName="";var slidebox=null;function get_width(o){var w=0;if(o.offsetWidth)
w=parseInt(o.scrollWidth,10);if(!w||isNaN(w)){if(o.currentStyle)
w=parseInt(o.currentStyle.width,10);else
w=parseInt(o.style.width,10);}
return w;}
function get_height(o){var h=0;if(o.offsetHeight)
h=parseInt(o.scrollHeight,10);if(!h||isNaN(h)){if(o.currentStyle)
h=parseInt(o.currentStyle.height,10);else
h=parseInt(o.style.height,10);}
return h;}
function UpdateLang(){if(txtMemberID.value=="")
txtMemberID.value=GetShowText("remark_memberID");if(txtNickName.value=="")
txtNickName.value=GetShowText("remark_name");if(txtMobile.value=="")
txtMobile.value=GetShowText("remark_mobile");if(txtPhone.value=="")
txtPhone.value=GetShowText("remark_phone");if(txtEmail.value=="")
txtEmail.value=GetShowText("remark_email");if(txtAddress.value=="")
txtAddress.value=GetShowText("remark_address");if(txtQQ.value=="")
txtQQ.value=GetShowText("remark_qq");if(txtMsn.value=="")
txtMsn.value=GetShowText("remark_msn");if(txtSkype.value=="")
txtSkype.value=GetShowText("remark_skype");if(txtSkype.value=="")
txtSkype.value=GetShowText("remark_skype");if(txtOtherItem.value=="")
txtOtherItem.value=GetShowText("remark_input")+otherItemName;if(txtContent.value=="")
txtContent.value=leaveWordPrompt;var divSend=get_element_id("divSend");if(divSend!=null)
divSend.className=GetShowText("new2_lw_send_calss");}
function onSubmit(){if(txtNickName.value==GetShowText('remark_name'))
txtNickName.value="";if(txtMobile.value==GetShowText('remark_mobile'))
txtMobile.value="";if(txtPhone.value==GetShowText('remark_phone'))
txtPhone.value="";if(txtAddress.value==GetShowText('remark_address'))
txtAddress.value="";if(txtSkype.value==GetShowText('remark_skype'))
txtSkype.value="";if(txtEmail.value==GetShowText('remark_email'))
txtEmail.value="";if(txtQQ.value==GetShowText('remark_qq'))
txtQQ.value="";if(txtMsn.value==GetShowText('remark_msn'))
txtMsn.value="";if(txtMemberID.value==GetShowText('remark_memberID'))
txtMemberID.value="";if(txtOtherItem.value==(GetShowText("remark_input")+otherItemName))
txtOtherItem.value="";if(txtContent.value==leaveWordPrompt)
txtContent.value="";if((minRequire&0x01)!=0&&(minRequire&0x02)!=0&&trim(txtNickName.value).length<2){alert(GetShowText("namePrompt"));UpdateLang();return;}
if((minRequire&0x04)!=0&&(minRequire&0x08)!=0&&trim(txtMobile.value).length==0){alert(GetShowText("phonePrompt"));UpdateLang();return;}
if((minRequire&0x10)!=0&&(minRequire&0x20)!=0&&trim(txtPhone.value).length==0){alert(GetShowText("phonePrompt"));UpdateLang();return;}
if((minRequire&0x100)!=0&&(minRequire&0x200)!=0&&trim(txtAddress.value).length==0){alert(GetShowText("remark_address"));UpdateLang();return;}
if((minRequire&0x4000)!=0&&(minRequire&0x8000)!=0&&trim(txtSkype.value).length==0){alert(GetShowText("remark_skype"));UpdateLang();return;}
if((minRequire&0x10000)!=0&&(minRequire&0x20000)!=0&&trim(txtMemberID.value).length==0){alert(GetShowText("remark_memberID"));UpdateLang();return;}
if((minRequire&0x40000)!=0&&(minRequire&0x80000)!=0&&trim(txtOtherItem.value).length==0){alert(GetShowText("remark_input")+otherItemName);UpdateLang();return;}
if((minRequire&0x40)!=0&&(minRequire&0x80)!=0){if(trim(txtEmail.value).length==0){alert(GetShowText("emailPrompt"));UpdateLang();return;}
re=/^[\w-]+(\.[\w-]+)*@[\w-]+(\.[\w-]+)+$/;if(!re.exec(trim(txtEmail.value))){alert(GetShowText("emailError"));UpdateLang();return;}}
if((minRequire&0x400)!=0&&(minRequire&0x800)!=0){re=/[1-9][0-9]{4,}/;if(!re.exec(txtQQ.value)){alert(GetShowText("qqError"));UpdateLang();return;}}
if((minRequire&0x1000)!=0&&(minRequire&0x2000)!=0){re=/\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/;if(!re.exec(txtMsn.value)){alert(GetShowText("msnError"));UpdateLang();return;}}
if(trim(txtContent.value).length<6){alert(GetShowText("leaveWordError"));UpdateLang();return;}
showLeaveWordLoader();btnSubmit.click();var divSend=get_element_id("divSend");divSend.onclick="void();";}
function showLeaveWordLoader(){var p_leaveword=get_element_id("p_leaveword");var p_leaveword_mask=get_element_id("p_leaveword_mask");p_leaveword_mask.style.display="block";p_leaveword_mask.style.height=get_height(p_leaveword)+"px";var p_leaveword_loader=get_element_id("p_leaveword_loader");p_leaveword_loader.style.display="block";p_leaveword_loader.style.left=((get_width(p_leaveword)-get_width(p_leaveword_loader))/2)+"px";p_leaveword_loader.style.top=((get_height(p_leaveword)-get_height(p_leaveword_loader))/2)+"px";}
function closeThisWin(){}
function ShowAdList(adString){InitAdMarquee(DecodeString(adString))}
function InitAdMarquee(adString){if(adString.length>0){var ADList=get_element_id("ADList");if(ADList){if(slidebox==null){slidebox=new SlideBox('ADList',10000,'left',adString.split("||"));}}}}
function focusInputEle(o,m){var remark="remark"
if(typeof(m)!="undefined")
remark=m;var t="";if(remark=="remark_content")
t=leaveWordPrompt;else if(remark=="remark_input")
t=GetShowText(remark)+otherItemName;else
t=GetShowText(remark);if(o.value==t){o.value='';o.style.color="#000000";}}
function blurInputEle(o,m){if(o.value==''){var remark="remark"
if(typeof(m)!="undefined")
remark=m;var t="";if(remark=="remark_content")
t=leaveWordPrompt;else if(remark=="remark_input")
t=GetShowText(remark)+otherItemName;else
t=GetShowText(remark);o.value=t;o.style.color="#999999";}}
function setMinLeaveWordPara(lTitle,lLeaveWordPrompt,lLeaveWordRequire){minRequire=lLeaveWordRequire;leaveWordPrompt=DecodeString(lLeaveWordPrompt);if(leaveWordPrompt.length==0)
leaveWordPrompt=GetShowText('remark_content');if(lTitle.length>0){var spTitle=get_element_id("spTitle");if(spTitle!=null)
spTitle.innerHTML=DecodeString(lTitle);}
if(txtContent!=null){txtContent.style.color="#999999";txtContent.value=leaveWordPrompt;}
var trMiniMemberID=get_element_id("trMiniMemberID");var trMiniName=get_element_id("trMiniName");var trMiniPhone=get_element_id("trMiniPhone");var trMiniMobile=get_element_id("trMiniMobile");var trMiniEmail=get_element_id("trMiniEmail");var trMiniAddress=get_element_id("trMiniAddress");var trMiniQQ=get_element_id("trMiniQQ");var trMiniMsn=get_element_id("trMiniMsn");var trMiniSkype=get_element_id("trMiniSkype");var trOtherItem=get_element_id("trOtherItem");if(trMiniName!=null&&(minRequire&0x01)!=0){trMiniName.style.display="";}
if(trMiniMobile!=null&&(minRequire&0x04)!=0){trMiniMobile.style.display="";}
if(trMiniPhone!=null&&(minRequire&0x10)!=0){trMiniPhone.style.display="";}
if(trMiniEmail!=null&&(minRequire&0x40)!=0){trMiniEmail.style.display="";}
if(trMiniAddress!=null&&(minRequire&0x100)!=0){trMiniAddress.style.display="";}
if(trMiniQQ!=null&&(minRequire&0x400)!=0){trMiniQQ.style.display="";}
if(trMiniMsn!=null&&(minRequire&0x1000)!=0){trMiniMsn.style.display="";}
if(trMiniSkype!=null&&(minRequire&0x4000)!=0){trMiniSkype.style.display="";}
if(trMiniMemberID!=null&&(minRequire&0x10000)!=0){trMiniMemberID.style.display="";}
if(trOtherItem!=null&&(minRequire&0x40000)!=0){trOtherItem.style.display="";}}
function reSizeTab(){}